<?php
/**
 * GPS検索用関数<br />
 *
 * @package apamanshop
 * @author　SS永田
 * @copyright　
 */
class Rstobi_Model_GpsSearch extends Rstobi_Model_Base
{
    /**
     * GPS検索用From句取得
     * 
	 * @access	public
	 * @param   array
	 * @param	array ※参照渡し
	 * @return  string
     */
	public function getFromForGpssearch()
	{
		$sql  = ' FROM';
		$sql .= '  T03WEB_HEYA T03';
		
		return $sql;
	}
	
    /**
     * GPS検索用WHERE句取得
     * 
	 * @access	public
	 * @param   array
	 * @param	array ※参照渡し
	 * @return  string
     */
	public function getWhereForGpssearch($params ,&$db_params)
	{
		$db_params['strStartLat'] = $params['startLat'];
		$db_params['strEndLat']   = $params['endLat'];
		$db_params['strStartLon'] = $params['startLon'];
		$db_params['strEndLon']   = $params['endLon'];
		
		$sql  = ' WHERE';
		
		//WHERE句
		$sql .= "     T03_IDO BETWEEN   :strStartLat AND :strEndLat";
		$sql .= " AND T03_KEIDO BETWEEN :strStartLon AND :strEndLon";
		
		return $sql;
	}
}